package org.graduates.webapp.actions.person.json;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.graduates.webapp.actions.BaseAction;
import org.projects.graduates.domain.Person;
import org.projects.graduates.domain.User;

@Action(results = { @Result(name = "success", type = "json", params = { "excludeProperties",
		"person.new, user.new, user.password" }) })
public class GetCurrentPersonUserAction extends BaseAction {

	private static final long serialVersionUID = 6553043689335384595L;

	private Person person;

	private User user;

	public String execute() {

		person = getCurrentPerson();

		user = getCurrentUser();

		return SUCCESS;
	}

	public Person getPerson() {
		return person;
	}

	public User getUser() {
		return user;
	}

}
